﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.TeamFoundation.TestManagement.Client;

namespace TestPlanWordWriter.Common
{
    public class TestResultInfo
    {
        public TestOutcome ResultOutcome { get; set; }
        public DateTime DateStarted { get; set; }
        public DateTime DateCompleted { get; set; }
        public string Comment { get; set; }
        public string ErrorMessage { get; set; }

        public TestResultInfo()
        {
        }

        public TestResultInfo(ITestResult testResult)
        {
            if (testResult == null)
                throw new ArgumentNullException("testResult");

            this.ResultOutcome = testResult.Outcome;
            this.DateStarted = testResult.DateStarted;
            this.DateCompleted = testResult.DateCompleted;
            this.Comment = testResult.Comment;
            this.ErrorMessage = testResult.ErrorMessage;
        }
    }
}
